package com.lxmes.pm.service.impl;

import java.util.List;
import com.lxmes.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.lxmes.pm.mapper.AProjectReportMapper;
import com.lxmes.pm.domain.AProjectReport;
import com.lxmes.pm.service.IAProjectReportService;

/**
 * 成果上报Service业务层处理
 * 
 * @author zhangzhiyu
 * @date 2023-04-04
 */
@Service
public class AProjectReportServiceImpl implements IAProjectReportService 
{
    @Autowired
    private AProjectReportMapper aProjectReportMapper;

    /**
     * 查询成果上报
     * 
     * @param id 成果上报主键
     * @return 成果上报
     */
    @Override
    public AProjectReport selectAProjectReportById(Long id)
    {
        return aProjectReportMapper.selectAProjectReportById(id);
    }

    /**
     * 查询成果上报列表
     * 
     * @param aProjectReport 成果上报
     * @return 成果上报
     */
    @Override
    public List<AProjectReport> selectAProjectReportList(AProjectReport aProjectReport)
    {
        return aProjectReportMapper.selectAProjectReportList(aProjectReport);
    }

    /**
     * 新增成果上报
     * 
     * @param aProjectReport 成果上报
     * @return 结果
     */
    @Override
    public int insertAProjectReport(AProjectReport aProjectReport)
    {
        aProjectReport.setCreateTime(DateUtils.getNowDate());
        return aProjectReportMapper.insertAProjectReport(aProjectReport);
    }

    /**
     * 修改成果上报
     * 
     * @param aProjectReport 成果上报
     * @return 结果
     */
    @Override
    public int updateAProjectReport(AProjectReport aProjectReport)
    {
        aProjectReport.setUpdateTime(DateUtils.getNowDate());
        return aProjectReportMapper.updateAProjectReport(aProjectReport);
    }

    /**
     * 批量删除成果上报
     * 
     * @param ids 需要删除的成果上报主键
     * @return 结果
     */
    @Override
    public int deleteAProjectReportByIds(Long[] ids)
    {
        return aProjectReportMapper.deleteAProjectReportByIds(ids);
    }

    /**
     * 删除成果上报信息
     * 
     * @param id 成果上报主键
     * @return 结果
     */
    @Override
    public int deleteAProjectReportById(Long id)
    {
        return aProjectReportMapper.deleteAProjectReportById(id);
    }
}
